package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.domain.NursingProject;
import com.zzyl.nursing.service.INursingProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
/**
 * 微信服务
 */
@RestController
@RequestMapping("/member/orders/project")
@Api(tags = "微信服务")
public class MemberNursingProjectController extends BaseController {

    @Autowired
    private INursingProjectService nursingProjectService;

    /**
     * 服务分页查询
     */
    @ApiOperation("服务分页查询")
    @GetMapping("/page")
    public TableDataInfo list(NursingProject nursingProject)
    {
        startPage();
        List<NursingProject> list = nursingProjectService.selectNursingProjectList(nursingProject);
        return getDataTable(list);
    }

    /**
     * 获取护理项目详细信息
     */
    @ApiOperation("获取护理项目详细信息")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@ApiParam(value = "护理项目ID", required = true)
                              @PathVariable("id") Long id)
    {
        return success(nursingProjectService.selectNursingProjectById(id));
    }
}
